import request from '@/utils/request.js'

export const GetMenuService = () => {
  return request.get('/menu/list')
}
export const AddMenuService = (data) => {
  return request.post('/menu/save', data)
}

export const EditMenuService = (data) => {
  return request.put('/menu/update', data)
}

export const DelMenuService = (id) => {
  return request.delete('/menu/delete', {
    params: { id }
  })
}

export const GetMenuDetailService = (id) => {
  return request.get('/menu/findById', {
    params: { id }
  })
}

export const GetMenuFindByQueryService = (name) => {
  return request.get('/menu/findByQuery', {
    params: {name}
  })
}